﻿// ============================================================================
//     _____ __  _      __            _       __      ____
//    / ___// /_(_)____/ /_____  ____| |     / /___ _/ / /
//    \__ \/ __/ / ___/ //_/ _ \/ ___/ | /| / / __ `/ / /
//   ___/ / /_/ / /__/ ,< /  __/ /   | |/ |/ / /_/ / / /
//  /____/\__/_/\___/_/|_|\___/_/    |__/|__/\__,_/_/_/
//
// Copyright (C) by daxnet
// https://gitee.com/daxnet/stickerwall
// MIT License
// ============================================================================

using System.Collections.ObjectModel;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.VisualBasic;

namespace Stickerwall.WebAPI.HealthChecks;

/// <summary>
///     Represents the health check endpoint that simply returns HTTP status 200.
/// </summary>
/// <remarks>
///     A lightweight health check endpoint is only used for periodic
///     check of the status of the service.
/// </remarks>
public sealed class HealthCheckLight : IHealthCheck
{
    #region Public Methods

    public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context,
        CancellationToken cancellationToken = new()) =>
        Task.FromResult(HealthCheckResult.Healthy());

    #endregion Public Methods
}